unit Principal;

interface

uses
  Classes, SysUtils, IWAppForm, IWApplication, IWColor, IWTypes, IWGrids,
  IWBaseComponent, IWBaseHTMLComponent, IWBaseHTML40Component, IWExtCtrls,
  IWCompMemo, IWCompListbox, IWCompLabel, IWCompEdit, IWCompCheckbox, Controls,
  IWVCLBaseControl, IWBaseControl, IWBaseHTMLControl, IWControl, IWCompButton;

type
  TfrmPrincipal = class(TIWAppForm)
    IWButton1: TIWButton;
    IWCheckBox1: TIWCheckBox;
    IWComboBox1: TIWComboBox;
    IWEdit1: TIWEdit;
    IWLabel1: TIWLabel;
    IWListbox1: TIWListbox;
    IWMemo1: TIWMemo;
    IWRadioGroup1: TIWRadioGroup;
    IWTimer1: TIWTimer;
    IWGrid1: TIWGrid;
    procedure IWTimer1AsyncTimer(Sender: TObject; EventParams: TStringList);
    procedure IWAppFormCreate(Sender: TObject);
    procedure IWRadioGroup1Click(Sender: TObject);
    procedure IWCheckBox1Click(Sender: TObject);
    procedure IWButton1Click(Sender: TObject);
  public
  end;

implementation

uses MaisControles01;

{$R *.dfm}

procedure TfrmPrincipal.IWAppFormCreate(Sender: TObject);
var
  i: Integer;
begin
  IWGrid1.RowCount := High(LongMonthNames);
  IWGrid1.ColumnCount := 1;
  for i := Low(LongMonthNames) to High(LongMonthNames) do begin
    IWRadioGroup1.Items.Add(LongMonthNames[i]);
    IWComboBox1.Items.Add(LongMonthNames[i]);
    IWListbox1.Items.Add(LongMonthNames[i]);
    IWMemo1.Lines.Add(LongMonthNames[i]);
    IWGrid1.Cell[i - 1, 0].Text := LongMonthNames[i]
  end;
end;

procedure TfrmPrincipal.IWButton1Click(Sender: TObject);
begin
  with TfrmMaisControles01.Create(WebApplication) do begin
    Show;
  end;
end;

procedure TfrmPrincipal.IWCheckBox1Click(Sender: TObject);
begin
  IWRadioGroup1.Visible := not IWCheckBox1.Checked;
  IWComboBox1.Visible := not IWCheckBox1.Checked;
  IWListbox1.Visible := not IWCheckBox1.Checked;
  IWMemo1.Visible := not IWCheckBox1.Checked;
  IWGrid1.Visible := not IWCheckBox1.Checked;
end;

procedure TfrmPrincipal.IWRadioGroup1Click(Sender: TObject);
begin
  IWListbox1.ItemIndex := IWRadioGroup1.ItemIndex;
  IWComboBox1.ItemIndex := IWRadioGroup1.ItemIndex;
  IWEdit1.Text := IWComboBox1.Items[IWComboBox1.ItemIndex];
end;

procedure TfrmPrincipal.IWTimer1AsyncTimer(Sender: TObject;
  EventParams: TStringList);
begin
  IWLabel1.Caption := TimeToStr(Time);
end;

initialization
  TfrmPrincipal.SetAsMainForm;

end.
